Apparatus and method

ABSTRACT

An apparatus and method to measure the position of a portion of a pump assembly within a well particularly for use in an oil or gas well and for downhole pumps driven by a drive shaft running from a surface motor. The apparatus comprises at least one measurement device which senses the position of a portion of a pump assembly downhole. The information can be used to position a rotor of the pump assembly at a position relative to a pump housing of the pump assembly to produce fluids from the well at an increased rate. Where two measurement devices are provided, they can count the number of revolutions of the drive shaft of the pump assembly at two spaced apart points. The strain or torsion within the drive shaft can then be calculated.

BACKGROUND OF THE INVENTION

The present invention relates to an apparatus and method for determining the position of an elongate member particularly but not exclusively within a well.

Progressive cavity pumps (PCPs) pump fluids from a well to the surface and their deployment in a well is common practice. Typically such a pump would be driven by a mechanism comprising an electric motor equipped with a speed reduction gearbox situated at the top of the well bore. The power is transmitted to the rotor of the PCP via an elongate member, known as a drive shaft, located within the production tubing conduit of the well. The speed of rotation of the drive shaft is selected to achieve optimum production rates from the well. The faster the rotation, the higher the rate of fluids produced but the greater the torsion and strain put on the drive shaft.

The drive shaft is typically assembled from a number of rods screwed together to give the overall drive shaft length required, which may be many hundreds of feet. It is known from engineering principles that in such an arrangement the drive shaft will experience torsional deflection (twisting) of a magnitude directly proportional to the power transmitted and to the shaft length.

Changes in the composition and condition of the produced fluids affects the speed of rotation of the pump in the production zone. Abrupt speed increases can be caused by gas bubbles, due to the removal of the resistance coincident with the passage of the gas bubble through the pump rotor. Equally, abrupt reductions in the speed of the pump can be caused by slugs of high viscosity fluids or solids. These abrupt changes to the freedom of the rotor to turn in the pump cause drastic changes in the torque applied to the drive shaft, and it has been found that this can result in failure of the shaft.

Indeed, breaking of PCP drive shafts accounts for a high percentage of failures in such production systems, leading to large repair costs and associated loss of production revenue.

In order to assemble the PCP in a well, a pump housing is provided within the well, the drive shaft is attached to clamps and lowered into the well with the pump rotor connected to the bottom of the drive shaft. The rotor is landed into the pump housing and is lowered to a position slightly spaced away from the bottom of the housing by a certain distance. If the rotor is too close to the bottom of the pump housing, the in-use temperature can increase past the operational design limits of the pump, causing damage to and failure of the pump. If the rotor is spaced too far away from the bottom of the pump housing, the rate of the fluids produced by the pump is reduced.

In order to position the rotor accurately, the drive shaft and rotor are lowered into the pump housing until the weight reduction on the hoist at the surface indicates that the rotor is in contact with the bottom of the housing. The drive shaft and rotor are then raised by the required distance in order to safely space the rotor away from the bottom of the housing.

In practise it is difficult to accurately determine the distance to raise the drive shaft at the surface to correspond with the longitudinal displacement of the rotor in the housing, due to the uncertain amount of give provided in the individual rods of the drive shafts and their interconnections. For wells which are at a non-vertical angle, this is even more difficult. Thus the positioning of the rotor is approximate and can result in failure of the pump or a reduced production rate from the well. Moreover, during use of the pump and rotation of the drive shaft, the give in the drive shaft may increase under continued stress and the drive shaft may also slip in the clamps, causing a change in the longitudinal displacement of the rotor, which can also result in failure of the pump or a reduced production rate.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention there is provided an apparatus for determining the position of at least a portion of a pump assembly in a borehole, the apparatus comprising:

a detection device adapted to detect the position of the portion of the pump assembly within the borehole, the detection device connectable to a borehole;

a communication device adapted to relay information on the position of the portion of the pump assembly within the borehole to a controller.

According to a second aspect of the present invention, there is provided an apparatus for determining the position of at least a portion of a pump assembly within a borehole, the apparatus comprising:

a portion of a pump assembly;

a detection device adapted to detect the position of the portion of the pump assembly within the borehole, the detection device being connectable to a borehole; and,

a communication device adapted to relay information on the position of the portion of the pump assembly within the borehole to a controller.

The portion of the pump assembly may comprise a rotor of a pump.

The portion of the pump assembly may comprise a drive shaft adapted to rotate a rotor.

The pump assembly includes a pump normally having a rotor and a pump housing and typically a drive shaft extending from a motor provided at the surface to the pump. The pump assembly may comprise other components.

In a first embodiment of the invention the detection device may be adapted to measure the extent of rotation of the drive shaft or pump within the borehole. Thus the position detected is the rotational position of the portion of the pump assembly, typically the drive shaft.

In a second embodiment the detection device may be adapted to detect the longitudinal displacement of the portion of the pump within the borehole. Thus, the position detected is the longitudinal position of the portion of the pump assembly, typically the rotor.

In preferred embodiments the detection devices are adapted to measure the extent of rotation of the pump or drive shaft within the borehole and detect the longitudinal displacement of the rotor of the pump assembly within the borehole.

The pump housing may be provided within the borehole. Thus, for embodiments which determine the longitudinal displacement of the portion of the pump within the borehole, they preferably determine the longitudinal displacement of the pump rotor relative to the pump housing.

‘Longitudinal displacement’ as used herein refers to the longitudinal displacement or position of the portion of the pump along the main axis of the borehole. For example, when the borehole is completely vertical the ‘longitudinal displacement’ is the vertical displacement.

Preferably the detection device has a first part which is connectable to the borehole and a second part which is connectable to the portion of the pump assembly.

Preferably the interaction of the first and second parts of the detection device allows the detection device to detect the position of the portion of the pump assembly within the borehole.

The detection device may be an electromagnetic wave detection device, such as a radioactive marker and detector; it may alternatively be a physical detection device with the first and second parts physically contacting each other. Preferably however the detection device is a magnetic detection device.

It should be readily apparent that a plurality of detection devices may be provided.

The controller may be a computer, microprocessor or other automated controller, or alternatively may be a user.

The apparatus may comprise a movement mechanism, adapted to vary the longitudinal displacement of the portion of the pump assembly (typically the pump rotor relative to the pump housing) optionally in response to the longitudinal displacement detected by the detection device. Thus, the controller can be connected to the movement mechanism.

The apparatus typically comprises a holding device adapted to hold the drive shaft of the pump assembly. The movement mechanism is preferably adapted to move the holding device in order to vary the longitudinal displacement of a portion of the pump assembly, typically the rotor.

The movement mechanism may comprise a jack such as a hydraulic jack adapted to move the holding device.

The holding device is typically a clamp.

Typically the detection device is provided proximate to the operating depth of the pump of the pump assembly; preferably within 50 m of the pump, more preferably within 30 m of the pump, even more preferably within 10 m of the pump, most preferably within 2 m of the pump.

The borehole is typically a well.

The detection device may comprise a measurement device.

Thus the invention also provides an apparatus to measure the torsion in an elongate member, the apparatus comprising:

a first measurement device adapted to measure the extent of rotation of an elongate member at a first point;

a second measurement device adapted to measure the extent of rotation of the elongate member at a second point; and

a comparison mechanism adapted to compare the rotation measured by the first measurement device and the rotation measured by the second measurement device.

According to a further aspect of the present invention, there is provided an apparatus for determining the torsion in an elongate member in a well, the apparatus comprising:

an elongate member;

a first measurement device adapted to measure the extent of rotation of the elongate member at a first point;

a second measurement device adapted to measure the extent of rotation of the elongate member at a second point; and

a comparison mechanism adapted to compare the rotation measured by the first measurement device and the rotation measured by the second measurement device.

The elongate member is typically suspended within a well and may comprise a series of connected members. Typically the elongate member connects an artificial lift device, for example a submergible progressive cavity pump, within the well to a motor at the surface or at the top of the well close to the surface. Typically, the elongate member is a drive shaft.

The torsion of an elongate member is the degree of strain placed on that elongate member by rotation of forces acting in equal but opposite directions.

The first measurement device may be provided at the surface. Preferably the first point is proximate to the motor and preferably the second point is at the opposite end of the shaft, preferably proximate to the pump. In alternative embodiments, the first measurement device can be adapted to measure the output axle of the motor in order to measure the extent of rotation of the elongate member at the first point.

Each measurement device may each comprise a magnet and a magnet sensing device, one being provided on the elongate member and the other being provided proximate to but not connected to the elongate member such that one rotates with respect to the other.

Preferably a magnet is provided on the elongate member and the magnetic sensing device is provided proximate to but not connected to the elongate member.

Preferably the magnetic sensing device of the first measurement device is provided on a frame.

Preferably the magnetic sensing device of the second measurement device is provided on a production tubing or on a housing on the production tubing.

Preferably the comparison mechanism is provided at the surface. Typically each measurement device is connected to the comparison mechanism, by a cable or the like. Typically each complete revolution of the elongate member is sensed by each measurement device and this information can be transmitted to the comparison mechanism by an electric current or any other mechanism.

The apparatus may comprise a third and fourth measurement device which co-operate with the first and second measurement device such that each half revolution of the elongate member at each point is sensed and this information is transmitted to the comparison mechanism. Thus the ‘extent of rotation’ can be less than one complete revolution, equal to one complete revolution or more than one complete revolution.

Similarly any number of further measurement device may be provided to measure part-revolutions of the elongate member.

The torsion of the elongate member is calculated by comparison of the difference between the extent of rotation of the elongate member at the first and second points, the speed of rotation of the elongate member and the length between the first and second points of the elongate member. Other factors such as temperature and pressure may also be taken into account.

Preferably the apparatus further comprises alarms which are adapted to activate should the torsion determined by comparison of the extent of rotation of the elongate member at the first and second points exceed or approach a level indicative of fracture or breakage of the elongate member. Preferably a mechanism to manipulate the motor may be activated when predetermined limits of torsion are exceeded.

Preferably pre-determined acceptable values for all parameters may be compared to monitored values for the purpose of initiating such alarms, trips or drive-shaft manipulation procedures.

The measurement device at the second point may be combined with sensing device, such as temperature, pressure or other sensors.

The measurement device at the first point may be combined with other sensing devices to monitor additional drive-shaft parameters, for example, the speed of rotation and the direction of rotation.

Preferably the apparatus further comprises a control device connected to the elongate member, the control device being adapted to vary the speed of the elongate member, typically via the motor, in response to the torsion calculated by the comparison mechanism.

Preferably the first and second points are spaced apart from each other on the elongate member. There can be at least 10 m between the first and second point, preferably at least 50 m between the first and second points, more preferably at least 100 m between the first and second points.

The distance between the first and second points on the elongate member can be at least 25% of the total length of the elongate member, preferably more than 50%, more preferably more than 75%, even more preferably more than 90% of the total length of the elongate member.

According to a further aspect of the present invention there is provided a method for determining the position of at least a portion of a pump assembly in a borehole, the method comprising:

providing a detection device within the borehole;

detecting a position of the portion of the pump assembly within the borehole, relaying the information on the position of the portion of the pump assembly within the borehole via a communication device to a controller.

Preferably the method is performed using apparatus in accordance with the first and optionally second and optionally other earlier aspects of the invention.

In one embodiment the method determines the longitudinal displacement of the portion of the pump assembly, typically the rotor. In another embodiment the method determines the extent of rotation of the portion of the pump assembly, typically the drive shaft. In preferred embodiments, the method determines both the longitudinal displacement of the portion of the pump assembly and the extent of rotation of the portion of the pump assembly.

The method may include moving the pump rotor with respect to the pump housing, detecting the longitudinal displacement of the rotor with respect to the pump housing, and optionally adjusting the longitudinal displacement of the rotor in response to the longitudinal displacement detected.

The movement mechanism preferably moves the pump rotor such that the longitudinal distance between the rotor and the bottom of the pump housing corresponds to an optimum longitudinal distance between the rotor and the bottom of the pump housing, that is typically where the rate of flow from the pump is at a maximum, typically without surpassing the operational design limits of the pump.

The communication device may be an electrical cable extending from the well to the surface.

The invention also provides a method for determining the torsion of an elongate member, the method comprising:

rotating at least a portion of an elongate member;

measuring the extent of rotation of the elongate member at a first point;

measuring the extent of rotation of the elongate member at a second point; and

comparing the extent of rotation of the elongate member at the first and second points.

Preferably the method according to the third aspect of the present invention is utilised with the apparatus according to the first aspect of the present invention.

The speed of rotation of the elongate member may be varied as a consequence of the torsion determined in order to reduce the likelihood of or preferably avoid the elongate member from fracturing or breaking.

Preferably the method is used to determine the torsion of an elongate member suspended within a well. Preferably the method is used to determine the torsion of a drive shaft extending from a motor to a pump within the well.

Preferably the measurement device senses each revolution of the elongate member. Preferably therefore, the measurement device counts the number of revolutions of the elongate member.

BRIEF DESCRIPTION OF THE DRAWINGS

An embodiment of the present invention will now be described, by way of example only, with reference to the accompanying drawings in which:

FIG. 1 is a diagrammatic sectional view of a well having a progressive cavity pump and torsion detecting apparatus according to the present invention installed therein;

FIG. 2 is an enlarged diagrammatic sectional view of the lower end of the FIG. 1 well;

FIG. 3 a is a diagrammatic view of a compensating mechanism provided for certain embodiments of the present invention, in a first position;

FIG. 3 b is a diagrammatic view of the compensating mechanism of FIG. 3 a, in a second, raised position;

FIG. 4 is an enlarged view of components attached to a wellhead of the well shown in FIG. 1; and

FIG. 5 is a diagrammatic view of the data produced by measurement devices of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIG. 1 shows an oil producing well comprising a well casing 2 and a submergible progressive cavity pump 1 suspended therein by production tubing 3. The cavity pump 1 pumps well fluids through the production tubing 3 to a wellhead 5 at the surface where it is recovered by conventional means (not shown). It will be understood that the production well casing 2, production tubing 3 and a drive shaft 44 can extend for hundreds of metres depending on the depth of the well and so FIG. 1 is not to scale. The drive shaft 44 is typically made up of a series of drive rods 17.

Cavity pumps function by the provision of helical rotor 12 in a housing 14. The helical rotor 12 drives fluid into the production tubing 3 and upwards to the surface. Such pumps are known in the art and can be obtained from Schlumberger or Weatherford for example.

A downhole measurement device 31 is provided proximate to the operating depth of the cavity pump 1, as shown in FIG. 2. A magnet 13 is attached to the drive shaft 44 and a magnetic sensing device 18 is provided in a housing 32 provided on the production tubing 3. The downhole measurement device 31 can detect when the magnet 13 is aligned with the magnetic sensing device 18. Thus the downhole measurement device can detect longitudinal movement of the drive shaft 44 and can count the number of revolutions of the drive shaft 44 near the cavity pump 1. Such sensing devices are commercially available and can be obtained from a number of suppliers, one being RS Components.

Power is supplied to the magnetic sensing device 18 via a cable 20 and the data gathered by the magnetic sensing device 18 is transmitted to the computer 24 via a transmission cable 25 (shown only in FIG. 1).

To assemble the pump 1, the housing 14 is first lowered into the well with the production tubing 3. A torque anchor 4 secures the housing 14 of the pump 1 to the well casing 2 in order to prevent it from rotating with respect thereto.

The rotor 12 is then attached to the drive shaft 44 at the surface. The magnet 13 of the downhole measurement device 31 is attached to the drive shaft 44. The rotor 12 and attached drive shaft 44 are lowered into the production tubing 3. Additional rods 17 of the drive shaft 44 are successively added thereto until the magnet 11 passes the magnetic sensor 18. The magnetic sensor 18 senses the magnet 13 and relays this information to the surface via a communication line 20. As the length of the rotor 12 is known, a simple calculation can be performed to position the rotor 12 at the optimum distance from the bottom of the housing 14.

Thus embodiments of the invention benefit in that the position of a rotor of a pump may be accurately determined. This can provide an increased production rate from the pump since the rotor can be positioned at a point to allow the pump to safely produce at its maximum capacity.

In use, the rotor 12 of the pump 1 is rotated by the drive shaft 44 which is suspended within the production tubing 3 from an electric motor 7 via a drive mechanism 6 and a speed reduction gear box 8. The drive shaft 44 connects to the rotor 12 via an internal shaft 11.

During use, the downhole measurement device 31 continues to sense the vertical/longitudinal displacement of the rotor 12 of the pump 1 and this information may be continually relayed to the surface where the longitudinal displacement of the rotor may be altered in response to this information.

FIGS. 3 a and 3 b show a compensating mechanism 40 which may be used to automatically correct the longitudinal displacement of the rotor 12, should this change during use for any reason, for example should the drive shaft 44 slip from its clamps or if the give in the drive shaft 44 increases over time.

The compensating mechanism 40 comprises a clamp 41 and tapered slips 42 both mounted on a bearing unit 43, a hydraulic jack 44 and a hollow piston 47. The hydraulic jack 45 is provided above the wellhead 5 and below the drive motor 7, mounted on a supporting framework 46.

The drive shaft 44 is held by the clamp 41 and passes through the bearing unit 43 and hollow piston 47. The clamp 41 transfers the weight of the drive shaft 44 and attached rotor 12 to the slips 42 which also holds the drive shaft 44 and attached pump 1. Thus movement of the piston 47 will cause movement of the drive shaft 44. The bearing unit 43 allows for free rotation of the drive shaft 44 through the hollow piston 47 of the hydraulic jack 45.

Thus when the downhole measurement device 31 relays information that the longitudinal displacement of the rotor 12 has changed, the piston 47 of the hydraulic jack 45 is activated to move, which via the bearing unit 43 and slips 42 moves the drive shaft 44 vertically and the connected rotor 12 vertically/longitudinally. Thus the rotor 12 may be repositioned to its optimum distance from the bottom of the housing 14.

Embodiments of the present invention benefit in that the rotor 12 can be maintained in the optimum longitudinal position for safely pumping fluids at its maximum capacity. Thus the production rate from the well can be increased.

Certain embodiments of the present invention also comprise a surface measurement device 30, shown in FIG. 4. The surface measurement device comprises a magnet 16 provided on a coupling 15 of the drive shaft 44 and a magnetic sensing device 21 provided on a frame 34 adjacent to the coupling 15. The magnetic sensing device 21 can sense the magnet each time it passes close to the sensing device 21 and thereby counts the number of rotations of the drive shaft 44 above the surface. The data from the magnetic sensing device 21 is transmitted to a computer 24 via the cable 26. Power is supplied to the magnetic sensing device 21 by way of the cable 23.

Thus in use, the surface measurement device 30 counts the number of rotations of the drive shaft 44 at the surface and sends this data to the computer 24.

Activation of the motor 7 will put the drive shaft 44 under strain/torsion due to the drag on the pump 1 caused by the production fluids, and to a lesser extent the temperature and pressure within the well casing. The amount of torsion is also dependent on the length of the drive shaft 44 between the surface and downhole measurement devices 30, 31. Thus, after the motor 7 is activated and the drive shaft 44 begins to rotate at the surface as detected by the surface measurement device 30, the drive shaft 44 will twist and there will be a delay before the drive shaft 44 rotates close to the cavity pump 1.

The downhole measurement device 31 counts the number of rotations of the drive shaft 44 at the opposite end which, due to this torsion, will typically be different from that at the top of the elongate member. This data will also be sent to the computer 24 for comparison with data received from the surface measurement device 31. Other parameters, such as the speed at which the motor rotates the drive shaft 44 and the distance between the surface 30 and downhole 31 measurement devices will also be sent to the computer 24.

The computer continuously calculates and provides real time data on the amount of twisting/torsion/rotational deflection on the drive shaft 44. This can vary in time due to the different types of fluids encountered by the pump 1. For example, at one point in time, the pump can be pumping liquids to the surface whereas at another point in time, the pump may encounter sand or viscous liquids which will cause extra drag and increase the torsion on the drive shaft 44. The computer 24 thus monitors, displays and reports the torsion in the drive shaft 44. Should this level be approached or exceeded, the computer can be adapted to activate alarms or reduce the speed of rotation of the drive shaft by reducing the speed of the motor 7 by for example, manipulating the gearbox 8 to ensure that it does not exceed a predetermined safety level which could cause the drive shaft 44 to fracture or break due to its torsional strain. As noted above, the torsion in the drive shaft 44 is also proportional to the speed of rotation of the drive shaft and so reducing the speed of the motor results in a reduction of the torsion in the drive shaft 44.

Suppliers of the rods 17 indicate the torsional modulus of elasticity (G) when supplying the rods. It depends on the rod thickness and the material used to make the rod.

For example, if a drive rod 17 is rated to withstand 1000 lbs of torque, an alarm can be set to sound when it is calculated that the rod 17 is experiencing 800 lbs of torque and the motor 7 can be set to automatically shut down when the torque the rod 17 is experiencing is calculated to be 950 lbs.

The calculation of such torque can be computed using established and known mathematical equations. One suitable equation is: Df=584TaL/D ⁴ G wherein Df=Angular deflection in degrees Ta=Torsional Moment Applied (That is the radial force applied by motor) in ft-lbs L=Rod Length in feet D=diameter of shaft in feet G=Torsional Modulus of Elasticity in lbs/square feet.

An acceptable level of torsional shear stress may also be calculated using known mechanical engineering principles: Ta=SZp wherein S=Allowable Torsional Stress Ta=Torsional Moment Applied (That is the radial force applied by motor) in ft-lbs Zp=Polar Sectional Modulus of the Shaft

However, the Allowable Torsional Stress used in practice is 6000 lb/sq. in. The formula above may therefore be transposed as: Ta=6000×Zp

Published data provided by the supplier of the proprietary drive rods, such as the rods 17, and/or data obtained from mechanical testing of such drive rod units may be used in the evaluation of specific units employed in a drive string, such as the drive shaft 44.

Typically, a drive shaft string, such as the drive shaft 44, transmitting power to a progressive cavity pump such as the pump 1 will be made up of multiple drive shafts, such as the drive rods 17 of common geometry, each transmitting the same torque and undergoing the same amount of twisting.

The amount of acceptable twisting can therefore be calculated for any given drive shaft string at a pre-determined acceptable level of torsional shear stress.

Twisting in excess of that determined acceptable for any individual drive shaft string can be measured as described herein and protective measures initiated to prevent catastrophic failure of that drive shaft string.

Reference can also be made to “Machinery's Handbook”, 21^(st) edition, pages 450-453, which is incorporated herein by reference in its entirety, for more detail on such calculations.

Typically the data sent from the measurement devices 30, 31 will be in a square wave form, such as that shown in FIG. 5 and the torsion will be discernible by comparison of the wave form 27 produced by the surface measurement device 30 and the wave form 28 produced by the downhole measurement device 31. The amount of twisting in the drive shaft 44 may be compared by automatic electronic processing methods to pre-determined acceptable values. Automatic electronic processing may also be used to protect the drive shaft 44 from damage by initiation of alarm, trip and/or system adjustment procedures.

In certain embodiments of the present invention it is not necessary to provide the information to the user as to the extent of rotation of the elongate member at the two points, such as the surface and near the cavity pump 1, but only the difference between the extent of rotation of the elongate member at these two points. Similarly, for the embodiments where a computer, such as the computer 24, is adapted to manipulate the speed of the motor 7 to ensure the torsion in the drive shaft 44 is kept below a certain level, it does not need to know the extent of rotation of the drive shaft at the first and second points but it does need to know the difference between these values.

Thus embodiments of the present invention benefit from being able to determine when the drive shaft 44 is undergoing a critical torsional strain and reduce the likelihood of such a strain resulting in the fracture or breakage of the drive shaft 44 by taking appropriate action, such as reducing the speed of rotation of the drive shaft 44.

Certain embodiments of the present invention thus benefit from reduced failure and thus avoid the large repair costs and loss of production revenue.

Certain embodiments of the present invention also benefit from allowing the cavity pumps to be run at a far higher speed, which increases the rate of recovery of the production fluids, and can be slowed down when the torsion detection apparatus indicates a critical torsional strain on the drive shaft. Certain prior art systems were generally operated at a much lower speed in case of fracture or breakage of the drive shaft.

Improvements and modifications may be made without departing from the scope of the invention. For example, a plurality of magnets may be provided in each of the sensing devices, particularly the downhole sensing device. These magnets may be spaced away from each other longitudinally or rotationally. When spaced away from each other longitudinally, they can provide more information on the longitudinal position of the pump downhole. 

1. An apparatus for determining the position of at least a portion of a pump assembly in a borehole, the apparatus comprising: a detection device adapted to detect the position of the portion of the pump assembly within the borehole, the detection device connectable to a borehole; a communication device adapted to relay information on the position of the portion of the pump assembly within the borehole to a controller.
 2. Apparatus as claimed in claim 1, wherein the detection device has a first part which is connectable to the borehole and a second part which is connectable to the pump assembly.
 3. Apparatus as claimed in claim 1, wherein the detection device comprises a magnet and a magnet sensing device.
 4. Apparatus as claimed in claim 1, wherein the detection device is adapted to detect the longitudinal displacement of the portion of the pump assembly within the borehole.
 5. Apparatus as claimed in claim 4, comprising a movement mechanism, adapted to vary the longitudinal displacement of the portion of the pump assembly.
 6. Apparatus as claimed in claim 5, wherein the movement mechanism is adapted to vary the longitudinal displacement of the portion of the pump assembly in response to the longitudinal displacement of the portion of the pump assembly detected by the detection device.
 7. Apparatus as claimed in claim 1, wherein the portion of the pump assembly comprises an elongate member and the detection device comprises a first measurement device adapted to measure the extent of rotation of the elongate member at a first point and the apparatus further comprises a second measurement device adapted to measure the extent of rotation of the elongate member at a second point; and a comparison mechanism adapted to compare the rotation measured by the first measurement device and the rotation measured by the second measurement device.
 8. Apparatus as claimed in claim 7, wherein the elongate member is adapted to connect a rotatable member, which in use, is provided in a well, to a rotating mechanism which in use, is provided at the top of or above the well.
 9. Apparatus as claimed in claim 8, wherein the rotatable member is an artificial lift device.
 10. Apparatus as claimed in claim 8, wherein the rotating mechanism is a motor.
 11. Apparatus as claimed in claim 7, wherein each measurement device is connected to the comparison mechanism and is adapted to transmit information thereto.
 12. Apparatus as claimed in claim 7, wherein each measurement device is adapted to sense each complete revolution of the elongate member.
 13. Apparatus as claimed in claim 7, wherein each measurement device counts the number of revolutions of the elongate member.
 14. Apparatus as claimed in claim 7, further comprising a control device connected to the elongate member, the control device being adapted to vary the speed of the elongate member in response to the torsion calculated by the comparison mechanism.
 15. Apparatus as claimed in claim 7 comprising more than two measurement devices.
 16. Apparatus as claimed in claim 15, comprising a third and fourth measurement device which co-operate with the first and second measurement devices such that the apparatus is adapted to sense each half-revolution of the elongate member at the first and second points.
 17. Apparatus as claimed in claim 7, wherein the measurement device at the first point comprises at least one sensing device adapted to monitor at least one of the speed of rotation and the direction of rotation of the elongate member.
 18. A method for determining the position of at least a portion of a pump assembly in a borehole, the method comprising the steps of: providing a detection device within the borehole; detecting a position of the portion of the pump assembly within the borehole; and relaying the information on the position of the portion of the pump assembly within the borehole to a controller.
 19. A method as claimed in claim 18, used to determine the longitudinal displacement of the portion of the pump assembly.
 20. A method as claimed in claim 19, wherein the longitudinal displacement of the portion of the pump assembly is adjusted in response to the detected longitudinal displacement of the portion of the pump assembly.
 21. A method as claimed in claim 18, wherein the portion of the pump assembly comprises an elongate member and the method further comprises the steps of: rotating at least a portion of the elongate member; measuring the extent of rotation of the elongate member at a first point; measuring the extent of rotation of the elongate member at a second point; and comparing the extent of rotation of the elongate member at the first and second points.
 22. A method as claimed in claim 21, wherein the method is used to determine the torsion of an elongate member suspended within a well.
 23. A method as claimed in claim 22, wherein the method is used to determine the torsion of a drive shaft extending from a motor to a pump within the well.
 24. An apparatus for determining the position of at least a portion of a pump assembly within a well, the apparatus comprising: a portion of a pump assembly; a detection device adapted to detect the position of the portion of the pump assembly within the borehole, the detection device being connectable to a borehole; and a communication device adapted to relay information on the position of the portion of the pump assembly within the borehole to a controller.
 25. Apparatus as claimed in claim 24, wherein the portion of the pump assembly comprises an elongate member and the detection device comprises a first measurement device adapted to measure the extent of rotation of the elongate member at a first point; the apparatus further comprising a second measurement device adapted to measure the extent of rotation of the elongate member at a second point; and a comparison mechanism adapted to compare the rotation measured by the first measurement device and the rotation measured by the second measurement device.
 26. Apparatus as claimed in claim 25, further comprising a motor and a rotatable member.
 27. Apparatus as claimed in claim 25, wherein the first measurement device is provided above the well.
 28. Apparatus as claimed in claim 25, wherein the second measurement device is provided in the well.
 29. Apparatus as claimed in claim 25, wherein the first point is proximate to the motor and the second point is proximate to the rotatable member.
 30. Apparatus as claimed in claim 25, wherein each measurement device comprises a magnet and a magnet sensing device at least one being provided on the elongate member and the other being provided proximate to but not connected to the elongate member such that one is rotatable with respect to the other.
 31. Apparatus as claimed in claim 30, wherein the magnet is provided on the elongate member and the magnetic sensing device is provided proximate to but not connected to the elongate member.
 32. Apparatus as claimed in claim 25, further comprising production tubing and wherein the magnetic sensing device of the second measurement device is provided on the production tubing.
 33. Apparatus as claimed in claim 25, wherein the comparison mechanism is provided at the surface. 